20 HIMEM: 35070:ADRS = 35070: CALL ADRS: POKE 232,0: POKE 233,145: DEF FN DG(H) = (H / 360 - INT (H / 360)) * 360: DEF FN D(H) = FN DG( FN DG(H + 360)): DEF FN RD(X) = INT (X + .5): DEF FN RN(X) = INT ( RND (1) * X + 1):VA$ = CHR$ (129):VN$ = CHR$ (142):VI$ = CHR$ (137):VP$ = CHR$ (144):VY$ = CHR$ (153):VV$ = CHR$ (150):VW$ = CHR$ (151):VK$ = CHR$ (139):VL$ = CHR$ (140): HGR : CALL 35070 100 POKE 2072,85: POKE 2073,42: CALL 2074: PRINT VY$: VTAB (2): HTAB (10): PRINT VA$4VK$VN$;" STARSHIP COMMANDER ": GOSUB 39000: GOSUB 10000: PRINT VA$0VK$VN$: PRINT CHR$ (4)"BLOAD CHAIN,A520": CALL 520"INFO1" 1070 STOP ### load data 10000 REM 10001 GOSUB 12000: GOSUB 39000: CALL 48251: VTAB (12): HTAB (13): PRINT "LOADING DATA": ONERR GOTO 15000 10010 VTAB (1): PRINT VA$0VN$VK$:Z$ = CHR$ (4): PRINT Z$;"OPEN STARSHIP DATA": PRINT Z$;"READ STARSHIP DATA": FOR Z = 7790 TO 8030: INPUT Z1: POKE Z,Z1: NEXT Z: FOR Z = 1 TO 15: INPUT EN(Z): INPUT D(Z): INPUT E(Z): INPUT RP(Z): INPUT RT(Z): INPUT AL(Z): NEXT Z 10090 FOR Z = 1 TO 3: INPUT KX(Z): INPUT KY(Z): INPUT KW(Z): INPUT KH(Z): INPUT DK(Z): INPUT XS(Z): INPUT YS(Z): INPUT XA(Z): INPUT YR(Z): INPUT EV(Z): INPUT AX(Z): INPUT AY(Z): INPUT K2(Z): INPUT SD(Z): INPUT MS(Z): INPUT KT(Z): INPUT KC(Z): INPUT K(Z): FOR Z2 = 0 TO 7: INPUT KP(Z,Z2): INPUT MK(Z,Z2): NEXT Z2: NEXT Z: INPUT AX(0): INPUT AY(0) 10170 FOR Z = 1 TO 4: FOR Z1 = 1 TO 3: INPUT CM(Z,Z1): INPUT CO(Z,Z1): INPUT CT(Z,Z1): INPUT PC(Z,Z1): NEXT Z1: INPUT AS(Z): INPUT DT(Z): INPUT LS(Z): NEXT Z: FOR Z = 0 TO 9: INPUT F(Z): NEXT Z 10180 FOR Z = 1 TO 3: INPUT VH(Z): INPUT VR(Z): NEXT Z: INPUT CA: INPUT EX: INPUT EY 10190 INPUT F1: INPUT CM(0,0) 10240 FOR Z = 1 TO 6: INPUT LP(Z): NEXT Z: INPUT MP: INPUT CB: INPUT B1: INPUT F9: INPUT F1: INPUT FF: INPUT F2: INPUT DA: INPUT BS: INPUT EV: INPUT AE: INPUT AB: INPUT BP: INPUT FH: INPUT LM: INPUT LP: INPUT EW: INPUT EH: INPUT EP: INPUT AL: INPUT AP: INPUT ED: INPUT AS: INPUT FS: INPUT FA: INPUT MS: INPUT MN: PRINT Z$"CLOSE STARSHIP DATA" 10310 POKE 216,0: CALL 35070: GOSUB 39000: CALL 48265: VTAB (10): PRINT "PLACE GAME DISKETTE BACK IN DISK": PRINT : PRINT "DRIVE.": POKE 216,0: GOSUB 43000: ONERR GOTO 16000 10360 RETURN ### wait for swap to save disk 12000 GOSUB 39000: VTAB (7): PRINT "REPLACE GAME DISKETTE WITH YOUR DATA": PRINT : PRINT "DISKETTE. THE DATA DISKETTE SHOULD BE": PRINT : PRINT "A FORMATTED 16 SECTOR DISKETTE.": GOSUB 43000: RETURN ### handle error; insist on return to starship disk, then restart DIM 15000 REM 15010 POKE 216,0: ONERR GOTO 15019: PRINT CHR$ (4)"CLOSE STARSHIP DATA" 15019 POKE 216,0: CALL 35070: VTAB (15): PRINT VA$4VK$VI$; TAB( 15): PRINT "DISK ERROR": POKE 2048,90: POKE 2049,255: CALL 2050: VTAB (17): HTAB (2): PRINT "PLACE GAME DISKETTE BACK IN DISK DRIVE": ONERR GOTO 15019 15025 GOSUB 43000: PRINT VA$0VK$VN$: PRINT CHR$ (4);"RUN DIM": STOP ### handle error waiting for starship disk to be replaced 16000 REM 16015 POKE 216,0: CALL 35070: VTAB (15): PRINT VA$VK$VI$; TAB( 15): PRINT "DISK ERROR": POKE 2048,90: POKE 2049,255: CALL 2050: GOSUB 43000: GOTO 10310 20030 Y = 17:Z(1) = 15:Z(2) = 17:Z = 2: GOSUB 41000: RETURN ### set window area to (2,4) - (39,22) 38000 PRINT VY$: VTAB (22): HTAB (39): PRINT VW$;: VTAB (4): HTAB (2): PRINT VV$;: RETURN ### set window area, then bold/inverse font and clear window 39000 GOSUB 38000: PRINT VA$4VI$VK$;VP$;: RETURN 41000 REM 41006 PRINT VY$VA$1VK$VI$;:Z1$ = "J":Y3 = - 1: FOR Z2 = 1 TO Z: IF Z(Z2) > 0 AND Y3 > 0 THEN X1 = Z2: GOTO 41030 41016 IF Z(Z2) > 0 THEN Y3 = Z2 41020 NEXT Z2:X1 = Y3: GOTO 41180 41030 Z1 = 250 / Z: FOR Z2 = 1 TO Z: HTAB (Y + 1): VTAB ( ABS (Z(Z2))): PRINT "E";: NEXT Z2 41079 X = INT ( PDL (0) / Z1 + .5): IF X > Z THEN X = Z 41080 IF X < 1 THEN X = 1 41081 IF Z2 > 20 THEN HTAB (Y): VTAB ( ABS (Z(X1))): PRINT " ";: POKE 2048,X1 * 5 + 50: POKE 2049,15: CALL 2050:Z2 = 0: HTAB (Y): PRINT "L"; 41082 Z2 = Z2 + 1: IF X < 1 THEN X = 1 41085 IF PEEK ( - 16287) > 127 THEN 41180 41090 IF Z(X) < 1 THEN GOTO 41079 41100 IF X1 < > X THEN HTAB (Y): VTAB (Z(X1)): PRINT " "; 41105 X1 = X: HTAB (Y): VTAB (Z(X)): PRINT "L";: GOTO 41079 41180 IF X1 < 1 THEN 41185 41183 HTAB (Y): VTAB (Z(X1)): PRINT " F"; 41185 GOSUB 45000:X = X1: RETURN ### wait for button 43000 VTAB (20): HTAB (9): PRINT VL$VA$1"PRESS BUTTON WHEN READY"; 43005 X2 = X2 + 1: IF X2 > 15 THEN VTAB (20): HTAB (6): PRINT VA$1VK$"L";: HTAB (34): PRINT "M":X2 = 0: POKE 2048,100: POKE 2049,30: CALL 2050 43010 IF X2 = 7 THEN VTAB (20): HTAB (6): PRINT " ";: HTAB (34): PRINT " "; 43020 IF PEEK ( - 16287) < 128 THEN 43005 43030 GOSUB 45000: PRINT VA$4VK$VI$;: RETURN # chirp 45000 POKE 2048,30: POKE 2049,30: CALL 2050: POKE 2048,80: POKE 2049,50: CALL 2050: RETURN